﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
				xmlns:msxsl="urn:schemas-microsoft-com:xslt" 
				xmlns:websoft="http://www.websoft.ru" 
				version="1.0">
<!--
'*	003_popup#.xsl
'*	Copyright (c) Websoft, 2006.  All rights reserved.
-->

<xsl:output method="xml" encoding="utf-8" omit-xml-declaration="yes"/>
<xsl:param name="imagesFolder"></xsl:param>
<!-- profiles definition start -->
<xsl:variable name="profiles">
	<blank>
		<src>1blank.gif</src>
		<width>1</width>
		<height>1</height>
	</blank>
	<popup_close>
		<id>popup_close</id>
		<alt>Close window</alt>
		<style>cursor:hand;cursor:pointer;</style>
		<src>popup_close.gif</src>
		<width>22</width>
		<height>22</height>
		<vspace>0</vspace>
		<hspace>2</hspace>
	</popup_close>
	<corner_top_left_header>
		<src>popup_tl_h.gif</src>
		<width>11</width>
		<height>11</height>
	</corner_top_left_header>
	<corner_top_right_header>
		<src>popup_tr_h.gif</src>
		<width>11</width>
		<height>11</height>
	</corner_top_right_header>
	<corner_bottom_left>
		<src>popup_bl.gif</src>
		<width>11</width>
		<height>11</height>
	</corner_bottom_left>
	<corner_bottom_right>
		<src>popup_br.gif</src>
		<width>11</width>
		<height>11</height>
	</corner_bottom_right>
	<corner_middle_left>
		<src>popup_ml.gif</src>
		<width>11</width>
		<height>11</height>
	</corner_middle_left>
	<corner_middle_right>
		<src>popup_mr.gif</src>
		<width>11</width>
		<height>11</height>
	</corner_middle_right>
	<headerbg><src>popup_h_bg.gif</src></headerbg>
	<headerbottombg><src>popup_m_bg.gif</src></headerbottombg>
	<background_top_edge_header><src>popup_bg_t_h.gif</src></background_top_edge_header>
	<background_left_edge_header><src>popup_bg_l_h.gif</src></background_left_edge_header>
	<background_right_edge_header><src>popup_bg_r_h.gif</src></background_right_edge_header>
	<background_left_edge><src>popup_bg_l.gif</src></background_left_edge>
	<background_right_edge><src>popup_bg_r.gif</src></background_right_edge>
	<background_bottom_edge><src>popup_bg_b.gif</src></background_bottom_edge>
	<header_style>font-family: Arial; font-weight: bold; font-size:18px; cursor:default;</header_style>
</xsl:variable>
<!-- profiles definition end -->
<!--		 Template: Root    --> 
<xsl:template match="/">
	<xsl:apply-templates select="params"/>
</xsl:template>
<!--		 Template: Params    --> 
<xsl:template match="params">
<xsl:variable name="cur_profile" select="popup_profile"/>
<xsl:variable name="show_button_close" select="button_close"/>
<xsl:variable name="click_hide" select="onclick_hide"/>
<xsl:variable name="cur_folder"><xsl:value-of select="$imagesFolder"/><xsl:value-of select="$cur_profile"/>\</xsl:variable>
<xsl:variable name="blank"><xsl:value-of select="$imagesFolder"/><xsl:value-of select="msxsl:node-set($profiles)/blank/src"/></xsl:variable>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td>
			<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/corner_top_left_header/width" /></xsl:attribute>
			<xsl:attribute name="height"><xsl:value-of select="msxsl:node-set($profiles)/corner_top_left_header/height" /></xsl:attribute>
			<img>
				<xsl:attribute name="src"><xsl:value-of select="$cur_folder"/><xsl:value-of select="msxsl:node-set($profiles)/corner_top_left_header/src" /></xsl:attribute>
				<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/corner_top_left_header/width" /></xsl:attribute>
				<xsl:attribute name="height"><xsl:value-of select="msxsl:node-set($profiles)/corner_top_left_header/height" /></xsl:attribute>
			</img>
		</td>
		<td width="100%">
			<xsl:attribute name="height"><xsl:value-of select="msxsl:node-set($profiles)/corner_top_left_header/height" /></xsl:attribute>
			<xsl:attribute name="background"><xsl:value-of select="$cur_folder"/><xsl:value-of select="msxsl:node-set($profiles)/background_top_edge_header/src" /></xsl:attribute>
			<img>
				<xsl:attribute name="src"><xsl:value-of select="$blank"/></xsl:attribute>
				<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/blank/width" /></xsl:attribute>
				<xsl:attribute name="height"><xsl:value-of select="msxsl:node-set($profiles)/blank/height" /></xsl:attribute>
			</img>
		</td>
		<td>
			<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/corner_top_right_header/width" /></xsl:attribute>
			<xsl:attribute name="height"><xsl:value-of select="msxsl:node-set($profiles)/corner_top_right_header/height" /></xsl:attribute>
			<img>
				<xsl:attribute name="src"><xsl:value-of select="$cur_folder"/><xsl:value-of select="msxsl:node-set($profiles)/corner_top_right_header/src" /></xsl:attribute>
				<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/corner_top_right_header/width" /></xsl:attribute>
				<xsl:attribute name="height"><xsl:value-of select="msxsl:node-set($profiles)/corner_top_right_header/height" /></xsl:attribute>
			</img>
		</td>
	</tr>
	<tr>
		<td>
			<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/corner_top_left_header/width" /></xsl:attribute>
			<xsl:attribute name="background"><xsl:value-of select="$cur_folder"/><xsl:value-of select="msxsl:node-set($profiles)/background_left_edge_header/src" /></xsl:attribute>
			<img>
				<xsl:attribute name="src"><xsl:value-of select="$blank"/></xsl:attribute>
				<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/blank/width" /></xsl:attribute>
				<xsl:attribute name="height"><xsl:value-of select="msxsl:node-set($profiles)/blank/height" /></xsl:attribute>
			</img>
		</td>
		<td width="100%">
			<xsl:attribute name="background"><xsl:value-of select="$cur_folder"/><xsl:value-of select="msxsl:node-set($profiles)/headerbg/src" /></xsl:attribute>
			<table width="100%" cellpadding="0" cellspacing="0" border="0">
				<tr>
    				<xsl:if test="$show_button_close='yes'">
					<td>
						<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/popup_close/width" /></xsl:attribute>
						<img>
							<xsl:attribute name="src"><xsl:value-of select="$blank"/></xsl:attribute>
							<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/blank/width" /></xsl:attribute>
							<xsl:attribute name="height"><xsl:value-of select="msxsl:node-set($profiles)/blank/height" /></xsl:attribute>
						</img>
					</td>
					</xsl:if>			
					<td width="100%" align="center" valign="middle">
						<div id="popupHeader">
							<xsl:attribute name="style"><xsl:value-of select="msxsl:node-set($profiles)/header_style" /></xsl:attribute>
							<xsl:value-of select="popup_header_text" disable-output-escaping="yes"/>
						</div>
					</td>
    				<xsl:if test="$show_button_close='yes'">
					<td valign="middle">
						<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/popup_close/width" /></xsl:attribute>
						<img>
							<xsl:attribute name="src"><xsl:value-of select="$cur_folder"/><xsl:value-of select="msxsl:node-set($profiles)/popup_close/src" /></xsl:attribute>
							<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/popup_close/width" /></xsl:attribute>
							<xsl:attribute name="height"><xsl:value-of select="msxsl:node-set($profiles)/popup_close/height" /></xsl:attribute>
							<xsl:attribute name="hspace"><xsl:value-of select="msxsl:node-set($profiles)/popup_close/hspace" /></xsl:attribute>
							<xsl:attribute name="vspace"><xsl:value-of select="msxsl:node-set($profiles)/popup_close/vspace" /></xsl:attribute>
							<xsl:attribute name="id"><xsl:value-of select="msxsl:node-set($profiles)/popup_close/id" /></xsl:attribute>
							<xsl:attribute name="alt"><xsl:value-of select="msxsl:node-set($profiles)/popup_close/alt" /></xsl:attribute>
							<xsl:attribute name="style"><xsl:value-of select="msxsl:node-set($profiles)/popup_close/style" /></xsl:attribute>
						</img>
					</td>
					</xsl:if>			
				</tr>
			</table>
		</td>
		<td>
			<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/corner_top_right_header/width" /></xsl:attribute>
			<xsl:attribute name="background"><xsl:value-of select="$cur_folder"/><xsl:value-of select="msxsl:node-set($profiles)/background_right_edge_header/src" /></xsl:attribute>
			<img>
				<xsl:attribute name="src"><xsl:value-of select="$blank"/></xsl:attribute>
				<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/blank/width" /></xsl:attribute>
				<xsl:attribute name="height"><xsl:value-of select="msxsl:node-set($profiles)/blank/height" /></xsl:attribute>
			</img>
		</td>	
	</tr>
	<tr>
		<td>
			<xsl:attribute name="height"><xsl:value-of select="msxsl:node-set($profiles)/corner_middle_left/height" /></xsl:attribute>
			<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/corner_middle_left/width" /></xsl:attribute>
			<img>
				<xsl:attribute name="src"><xsl:value-of select="$cur_folder"/><xsl:value-of select="msxsl:node-set($profiles)/corner_middle_left/src" /></xsl:attribute>
				<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/corner_middle_left/width" /></xsl:attribute>
				<xsl:attribute name="height"><xsl:value-of select="msxsl:node-set($profiles)/corner_middle_left/height" /></xsl:attribute>
			</img>
		</td>
		<td width="100%">
			<xsl:attribute name="height"><xsl:value-of select="msxsl:node-set($profiles)/corner_middle_left/width" /></xsl:attribute>
			<xsl:attribute name="background"><xsl:value-of select="$cur_folder"/><xsl:value-of select="msxsl:node-set($profiles)/headerbottombg/src" /></xsl:attribute>
			<img>
				<xsl:attribute name="src"><xsl:value-of select="$blank"/></xsl:attribute>
				<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/blank/width" /></xsl:attribute>
				<xsl:attribute name="height"><xsl:value-of select="msxsl:node-set($profiles)/blank/height" /></xsl:attribute>
			</img>
		</td>
		<td>
			<xsl:attribute name="height"><xsl:value-of select="msxsl:node-set($profiles)/corner_middle_right/height" /></xsl:attribute>
			<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/corner_middle_right/width" /></xsl:attribute>
			<img>
				<xsl:attribute name="src"><xsl:value-of select="$cur_folder"/><xsl:value-of select="msxsl:node-set($profiles)/corner_middle_right/src" /></xsl:attribute>
				<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/corner_middle_right/width" /></xsl:attribute>
				<xsl:attribute name="height"><xsl:value-of select="msxsl:node-set($profiles)/corner_middle_right/height" /></xsl:attribute>
			</img>
		</td>
	</tr>
	<tr>
		<td>
			<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/corner_top_left_header/width" /></xsl:attribute>
			<xsl:attribute name="background"><xsl:value-of select="$cur_folder"/><xsl:value-of select="msxsl:node-set($profiles)/background_left_edge/src" /></xsl:attribute>
			<img>
				<xsl:attribute name="src"><xsl:value-of select="$blank"/></xsl:attribute>
				<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/blank/width" /></xsl:attribute>
				<xsl:attribute name="height"><xsl:value-of select="msxsl:node-set($profiles)/blank/height" /></xsl:attribute>
			</img>
		</td>
		<td width="100%"  bgcolor="#FFFFFF" valign="top">
			<div style="margin-top:5px;">
			<div id="popupInnerText">
				<xsl:variable name="cur_margin" select="popup_margin" />
				<xsl:variable name="cur_style" select="concat('cursor:default; position: relative; width: 100%; margin: ',$cur_margin,'px;')" />
				<xsl:attribute name="style"><xsl:value-of select="$cur_style" /></xsl:attribute>
					<xsl:value-of select="popup_text" disable-output-escaping="yes"/>
			</div>
			</div>
		</td>
		<td>
			<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/corner_top_right_header/width" /></xsl:attribute>
			<xsl:attribute name="background"><xsl:value-of select="$cur_folder"/><xsl:value-of select="msxsl:node-set($profiles)/background_right_edge/src" /></xsl:attribute>
			<img>
				<xsl:attribute name="src"><xsl:value-of select="$blank"/></xsl:attribute>
				<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/blank/width" /></xsl:attribute>
				<xsl:attribute name="height"><xsl:value-of select="msxsl:node-set($profiles)/blank/height" /></xsl:attribute>
			</img>
		</td>	
	</tr>
	<tr>
		<td>
			<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/corner_bottom_left/width" /></xsl:attribute>
			<xsl:attribute name="height"><xsl:value-of select="msxsl:node-set($profiles)/corner_bottom_left/height" /></xsl:attribute>
			<img>
				<xsl:attribute name="src"><xsl:value-of select="$cur_folder"/><xsl:value-of select="msxsl:node-set($profiles)/corner_bottom_left/src" /></xsl:attribute>
				<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/corner_bottom_left/width" /></xsl:attribute>
				<xsl:attribute name="height"><xsl:value-of select="msxsl:node-set($profiles)/corner_bottom_left/height" /></xsl:attribute>
			</img>
		</td>
		<td width="100%">
			<xsl:attribute name="height"><xsl:value-of select="msxsl:node-set($profiles)/corner_bottom_left/height" /></xsl:attribute>
			<xsl:attribute name="background"><xsl:value-of select="$cur_folder"/><xsl:value-of select="msxsl:node-set($profiles)/background_bottom_edge/src" /></xsl:attribute>
			<img>
				<xsl:attribute name="src"><xsl:value-of select="$blank"/></xsl:attribute>
				<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/blank/width" /></xsl:attribute>
				<xsl:attribute name="height"><xsl:value-of select="msxsl:node-set($profiles)/blank/height" /></xsl:attribute>
			</img>
		</td>
		<td>
			<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/corner_bottom_right/width" /></xsl:attribute>
			<xsl:attribute name="height"><xsl:value-of select="msxsl:node-set($profiles)/corner_bottom_right/height" /></xsl:attribute>
			<img>
				<xsl:attribute name="src"><xsl:value-of select="$cur_folder"/><xsl:value-of select="msxsl:node-set($profiles)/corner_bottom_right/src" /></xsl:attribute>
				<xsl:attribute name="width"><xsl:value-of select="msxsl:node-set($profiles)/corner_bottom_right/width" /></xsl:attribute>
				<xsl:attribute name="height"><xsl:value-of select="msxsl:node-set($profiles)/corner_bottom_right/height" /></xsl:attribute>
			</img>
		</td>
	</tr>
</table>

</xsl:template>

</xsl:stylesheet>
